package com.truyen.service;

import java.util.List;

import com.truyen.persistence.entity.ChapterTmpTruyenTranh;
import com.truyen.persistence.entity.TruyenTranh;
import com.truyen.utils.PagingInfo;


public interface ChapterTmpTruyenTranhService {
	
	// tao moi
	void save(ChapterTmpTruyenTranh entity);

	//tim theo id
	ChapterTmpTruyenTranh findById(Long id);

	//lay tat ca
	List<ChapterTmpTruyenTranh> getAll();

	//tim chapter theo column name
	ChapterTmpTruyenTranh findByProperty(String column, Object value);

	//lay danh sach chapter theo truyen va kw
	List<ChapterTmpTruyenTranh> getLstChapterByTruyen(TruyenTranh entity, String kwSearch, String sort, String sortBy, PagingInfo pInfo);

	//tim chapter theo truyen va alias
	ChapterTmpTruyenTranh findAliasvTruyen(TruyenTranh entity, String alias);

	//lay tat ca danh sach chapter theo kw , theo noi dung null hoac khong, sap xep va phan trang
	List<ChapterTmpTruyenTranh> getLstAllChapterTmpTruyenTranh(String kwSearch, String sort, String sortBy, PagingInfo pInfo);

	//cap nhat lai chapter number
	void updateChapterNumber(Long id, float chapterNumberChange);

	//lay danh sach chapter theo truyen
	List<ChapterTmpTruyenTranh> getByTruyen(TruyenTranh entity);

	//tim chapter theo truyen va chapter number
	ChapterTmpTruyenTranh getChapterByTruyenChapnumber(TruyenTranh entity,	float chapterNumber);
	
	//xoa chapter truyen
	void delete(long id);

	//lay danh sach chapter moi
	List<ChapterTmpTruyenTranh> getListNewChapter(int maxLimit);

	//update theo chapter truyen
	void update(Long id, Float chapterNumber);

	//lay danh sach cac chapter moi cap nhat
	List<ChapterTmpTruyenTranh> getLstByOrderBy(String columnOrderBy, PagingInfo pInfo);

	//phan trang danh sach chapter ngoai trang info
	List<ChapterTmpTruyenTranh> getByTruyenPaging(TruyenTranh entity, PagingInfo pInfoChapter);

	//tim chapter truyen theo chapter number va truyen
	ChapterTmpTruyenTranh findByTruyenChapterNumber(TruyenTranh entity,	float chapterNumber);

	List<Object> getByIdTruyen(Long idTruyen);
}
